{include file="public/admin_head.html"}

<body>
<form class="form-horizontal" method ="post" onsubmit="return submitlogin()" action ="{$host}/index.php?act=admin&st=do_login" id="myform">
	<fieldset>
	<legend><B>用户登录</B></legend>
	<div class="control-group">
	  <label class="control-label">用户名：</label>
	  <div class="controls">
	    <input type="text" id="username" class="input-xlarge" name="username">
	  </div>
	</div>
	
	<div class="control-group">
	  <label class="control-label">密 码：</label>
	  <div class="controls">
	    <input type="password" id="password" class="input-xlarge" name="password">
	  </div>
	</div>

	 <div class="control-group">
	  <label class="control-label">验证码：</label>
	  <div class="controls">
	    <input type="text" id="chkcode" class="input-xlarge" style="width:100px" name="chkcode"><span>&nbsp;&nbsp;&nbsp;&nbsp;<img src="/?act=admin&st=check_code"></span>
	  </div>
	</div> 
	

	</fieldset>
	<div class="form-actions">		
		<button class="btn btn-primary width-100" type="reset"> 取 消 </button>
		<button class="btn btn-primary width-100 left-60" type="submit"> 确 认 </button>
	</div>
	<input type="hidden" name="ret" value="{$ret}">
    </form>

<script>
function submitlogin(){
	var username = $.trim($("#username").val());
	var pass = $.trim($("#password").val());
	if(username == ""){
		alert("请输入用户名");
		$("#username").focus();
		return false;
	}
	if( pass == ""){
		alert("请输入用户密码");
		$("#password").focus();
		return false;
	}
	$("#myform").submit();
	return true;
}
</script>


